home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: alt.msdos.programmer,comp.lang.c
- Subject: Re: Two C problems
- Date: Tue, 09 Jan 96 16:47:44 GMT
- Organization: none
- Message-ID: <821206064snz@genesis.demon.co.uk>
- References: <4cojnn$rgd@lugb.latrobe.edu.au> <4cp82k$gsq@cloner3.netcom.com>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4cp82k$gsq@cloner3.netcom.com>
- cfoster1@ix.netcom.com(Cameron "Cameron Foster " writes:
-
- >Actually, the "damn language" IS working sensibly and predictably! Read
- >up on C escape sequences.
-
- :-)
-
- >int i = 27; /* i has the decimal value of 27 */
-
- OK.
-
- >int i = \27; /* i has the decimal value of 23 (\27 is the octal */
- > /* representation of decimal 23) */
-
- No, that is illegal. For octal you write 027 or '\27'
-
- >int i = \x27 /* i has the decimal value of 39 */
-
- Similarly here you must have 0x27 or '\x27'
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-